gdk/surface: Delay gdk_surface_request_motion() requests internally
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 8 Dec 2020 20:33:06 +0000 (21:33 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 8 Dec 2020 22:27:03 +0000 (23:27 +0100)
commit80d4a08e306e36486e45542af0cdc58f5ad21e45
tree4da7b90fbc42b24b43e2efe3890c888f46f0f5ae
parent47d0b5ad0c20e0fbfc7de7d565adfb3f07f620a5
gdk/surface: Delay gdk_surface_request_motion() requests internally

Those requests are received while dealing with the ::layout frame
clock phase, this has the unintended side effect of making the
frame clock "rewind" to handle ::flush-events again during this
frame, which delays everything and practically halves the frame
rate.

We do intend to make the motion events dispatches on the next frame,
so do this in an idle at a slightly lower priority than layout/draw,
so the ::flush-events phase is actually requested for the next frame.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3264
gdk/gdksurface.c
gdk/gdksurfaceprivate.h